package com.twu.biblioteca;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;

public class BibliotecaApp {


    public static void main(String[] args) throws IOException {
        PrintStream stream = System.out;
        Menu menu = new Menu(stream);


        while (menu.quitProgram()) {
            menu.displayMenuItems();
            stream.print("Please choose an option by typing in the number of the option :");
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

            String option = reader.readLine();
            int optionSelected = Integer.parseInt(option);
            menu.selectMenuItem(optionSelected);
        }
    }
}

